package com.mt.channel.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mt.channel.api.service.IChannelAccountService;
import com.mt.channel.entity.ChannelAccountEntity;
import com.mt.common.PagerInfo;
import com.mt.common.ServiceResult;
@CrossOrigin
@RestController("/channelAccount")
public class ChannelAccountController {
    @Autowired
    private IChannelAccountService channelAccountService;

    @GetMapping("/findList")
    public ServiceResult<List<ChannelAccountEntity>> findList(Map<String, Object> params, PagerInfo<?> pagerInfo) {
        return channelAccountService.findList(params, pagerInfo);
    }

    @GetMapping("/findInfo")
    public ServiceResult<ChannelAccountEntity> findInfo(Map<String, Object> params) {
        return channelAccountService.findInfo(params);
    }

    @PostMapping("/doUpdateRelate")
    ServiceResult<Integer> doUpdateRelate(ChannelAccountEntity channelAccountEntity) {
        return channelAccountService.doUpdateRelate(channelAccountEntity);
    }
}
